package com.xk._01基础篇._04栈Stack;


import com.xk._01基础篇._03链表.ArrayList;

/*
 * 继承 不推荐
 */
public class Stack1<E> extends ArrayList<E> {

    public void push(E element) {
        add(element);
    }

    public E pop() {
        return remove(size - 1);
    }

    public E top() {
        return get(size() - 1);
    }
}
